// (c) Copyright Microsoft Corporation.
// This source is subject to the Microsoft Permissive License.
// See http://www.microsoft.com/resources/sharedsource/licensingbasics/sharedsourcelicenses.mspx.
// All other rights reserved.
using System;
using System.Collections.Generic;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.IO;

public partial class _Default : System.Web.UI.Page 
{
    protected void Page_Load(object sender, EventArgs e)
    {
        DirectoryInfo di = new DirectoryInfo(this.Server.MapPath(Request.ApplicationPath));
        List<FileInfo> fileList = new List<FileInfo>(di.GetFiles("*.aspx"));
        foreach(FileInfo fi in fileList)
        {
            if(0 == String.CompareOrdinal( fi.FullName,  this.Request.PhysicalPath))
            {    
                fileList.Remove(fi);
                break;
            }
        }

        PagesList.DataSource = fileList;
        PagesList.DataBind();
    }
}
